package shapes;

import java.awt.Color;

public class circle extends shape
{
	point2d centre;
	float rad;
	//CONSTRUCTORS
	circle(String n,String t,int bW,Color bC,Color fC, point2d p,float r) 
	{
		super.setShape(n, t, bW, bC, fC);
		centre = p;
		rad=r;
	}
	//GETTERS
	point2d getCentre()
	{
		return centre;
	}
	float getRad()
	{
		return rad;
	}
	//SETTERS
	public void setCentre(point2d p)
	{
		centre = p;
	}
	public void setRad(float r)
	{
		rad=r;
	}
	public void setCircle(String n,String t,int bW,Color bC,Color fC, point2d c,float r)
	{
		super.setShape(n,t,bW,bC,fC);
		centre = c;
		rad=r;
	}
	
	//METHOD TO AREA
	float area()
	{
		return (float) (Math.PI * rad * rad);
	}
	public String toString()
	{
		String s;
	
		s = "Circle at "  + centre.toString() +  " of radius " +getRad();
		return s;
	}

}

